package qj.app.host;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

import qj.tool.build.BuildUtil;
import qj.util.FileUtil;
import qj.util.HttpUtil;
import qj.util.HttpUtil.HttpMessage;
import qj.util.NetUtil;
import qj.util.ProcessUtil;
import qj.util.PropertiesUtil;
import qj.util.SystemUtil;
import qj.util.ThreadUtil;
import qj.util.ZipUtil;
import qj.util.funct.F0;
import qj.util.funct.Fs;
import qj.util.funct.P0;
import qj.util.funct.P1;
import qj.util.funct.P2;

// TODO key required
public class AppHost {
	public static void main(String[] args) {
		final Map<String,ManagedProcess> processes = new HashMap<String, ManagedProcess>();
		
		new Controller().start(1213, processes);
	}

	public static class Build {
		public static void main(String[] args) {
			System.out.println(BuildUtil.buildApp(AppHost.class).getAbsolutePath());
		}
	}

	public static class ManagedProcess {
		Process process;
		P0 niceShutdown;
		String appId;
		public ManagedProcess(String appId, Process process, P0 niceShutdown) {
			this.appId = appId;
			this.process = process;
			this.niceShutdown = niceShutdown;
		}
		
	}

}
